﻿using UnityEngine;
using System.Collections;

public class Fan : MonoBehaviour {

	public float speed = 1f;
	// Use this for initialization
	void Start () {
		r = this.GetComponent<Rigidbody2D>();
	}

	Rigidbody2D r;
	// Update is called once per frame
	void Update () {
		this.transform.Rotate (0, 0, speed * Time.deltaTime);
	}

	void OnCollisionEnter2D(Collision2D c){
		if (c.gameObject.tag == "Player") {
			MapMaster.Instance.KillPlayer();
		} else {

		}
		
	}
}
